//
//  InformationBranchCell.m
//  BMProject
//
//  Created by chris on 16/1/2.
//  Copyright © 2016年 BMProject. All rights reserved.
//

#import "InformationBranchCell.h"
#import "UIColor+Extension.h"
#import "DataModel.h"
#import "NSDate+Utils.h"

@implementation InformationBranchCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)setCellInfo:(JSONModel *)info {
    [super setCellInfo:info];
    self.bgView.backgroundColor = [UIColor whiteColor];
    self.bgView.layer.cornerRadius = 5.0;
    self.bgView.layer.masksToBounds = YES;
    StoresListModel *model = info;
    _nameLa.text = model.auditorSecond;
    NSString *time = [[NSDate dateWithString:model.auditSecondTime formatString:@"yyyyMMddHHmmss"] formatStringWithFormat:@"yyyy-MM-dd"];
    _dateLa.text = time;
    if(model.sign.intValue == 4 || model.sign.intValue == 2){
        _opinionLa.text = @"同意";
    }else if(model.sign.intValue == 3 || model.sign.intValue == 5){
        _opinionLa.text = [@"不同意,原因:" stringByAppendingString:[NSString ignoreEmptyStr:model.reson]];
    }else{
        _opinionLa.text = @"";
    }
}


@end
